const ajax = window.ajaxBusinessContract;

//账单管理列表
export const apiBillList = (params) => ajax.request(`/v1/business/bill/work/list`, 'post', params, {
  showLoading: true
});

//账单管理统计
export const apiBillCount = (params) => ajax.request(`/v1/projectFinance/bill/billCount`, 'post', params, {
  showLoading: true
});

//扣点租金填报
export const apiRentAmountWrite = (params) => ajax.request(`/v1/projectFinance/bill/fillingDeductionRent`, 'post', params, {
  showLoading: true
});

//根据客户查合同
export const apiContractByClient = (params) => ajax.request(`/v1/projectFinance/bill/partnerContractList`, 'post', params, {
  showLoading: true
});

//账单新建
export const apiBillAdd = (params) => ajax.request(`/v1/business/bill/create/apply`, 'post', params, {
  showLoading: true
});

//账单撤销
export const apiBillRevocation = (params) => ajax.request(`/v1/projectFinance/bill/cancelBill`, 'post', params, {
  showLoading: true
});

//账单作废
export const apiBillCancelBill = (params) => ajax.request(`/v1/business/bill/cancelBill`, 'post', params, {
  showLoading: true
});

//现金核销统计
export const apiWriteOffStatistics = (params) => ajax.request(`/v1/business/cash/writeOff/statistics`, 'post', params, {
  showLoading: true
});

//现金核销列表
export const apiWriteOffList = (params) => ajax.request(`/v1/business/cash/income/list`, 'post', params, {
  showLoading: true
});

//现金核销确认
export const apiWriteOff = (params) => ajax.request(`/v1/business/bill/writeOff`, 'post', params, {
  showLoading: true
});

//核销导入
export const apiWriteOffImport = (params) => ajax.uploadParam(`/v1/business/actual/income/import`, params, {
  showLoading: true
});

//核销导出
export const apiWriteOffExport = (params) => ajax.download(`/v1/business/actual/income/export`, params, {
  showLoading: true,
  responseType: 'blob'
});

//催款函下载
export const apiDunningLetter = (params) => ajax.download(`/v1/export/word/dunning/letter`, params, {
  showLoading: true,
  responseType: 'blob'
});

//催款函发送
export const apiSendMail = (params) => ajax.request(`/v1/export/word/dunning/letter/send/mail`, 'post', params, {
  showLoading: true,
});

//付款单下载
export const apiPaymentDownload = (params) => ajax.download(`/v1/export/excel/payment/order/download`, params, {
  showLoading: true,
  responseType: 'blob'
});

//付款单发送
export const apiPaymentSendMail = (params) => ajax.request(`/v1/export/excel/payment/order/send/mail`, 'post', params, {
  showLoading: true,
});

//核销导入
export const apiImportReceivable = (params) => ajax.uploadParam(`/v1/business/receivable/importReceivable`, params, {
  showLoading: true
});

//费用所属 根据合同查
export const apiGetChargeListByContract = (params) => ajax.request(`/v1/business/belong/asset/list`, 'post', params, {
  showLoading: true
});

//账单list
export const apiWriteOffBillImport = (params) => ajax.request(`/v1/business/writeOff/bill/list`, 'post', params, {
  showLoading: true
});

//账单详情
export const apiBillInfo = (params) => ajax.request(`/v1/business/bill/apply/detail`, 'post', params, {
  showLoading: true
});

//账单 押金 导出
export const apiBillExport = (params) => ajax.request(`/v1/business/bill/work/list/export`, 'post', params, {
  showLoading: true,
});

//滞纳金新增
export const apiLateFeeAdd = (params) => ajax.request(`/v1/business/lateFees/reduction/create`, 'post', params, {
  showLoading: true
});

//滞纳金新增
export const apiLateFeeInfo = (params) => ajax.request(`/v1/business/lateFees/reduction/detail`, 'post', params, {
  showLoading: true
});

//收款/核销
export const apiReceivableWriteOff = (params) => ajax.request(`/v1/business/receivable/writeOff`, 'post', params, {
  showLoading: true
});

//退款
export const apiRefund = (params) => ajax.request(`/v1/business/receivable/refund`, 'post', params, {
  showLoading: true
});

//退款详情
export const apiRefundDetail = (params) => ajax.request(`/v1/business/receivable/refundDetail`, 'post', params, {
  showLoading: true
});

//根据合同查客户等信息
export const apiCreateDetail = (params) => ajax.request(`/v1/business/bill/manage/create/detail`, 'post', params, {
  showLoading: true
});


//客户列表
export const apiClientList = (params) => ajax.request(`/v1/basic/customer/customer/info/list`, 'post', params, {
  showLoading: true
});

//合同列表 contractName
export const apiContractList = (params) => ajax.request(`/v1/basic/contract/contract/list`, 'post', params, {
  showLoading: true
});

//资产列表
export const apiAssetList = (params) => ajax.request(`/v1/basic/rentCycle/cycle/list`, 'post', params, {
  showLoading: true
});

//费项列表
export const apiChargeList = (params) => ajax.request(`/v1/business/bill/item/list`, 'post', params, {
  showLoading: true
});

//填报
export const apiFillForm = (params) => ajax.request(`/v1/business/bill/sales/createUpdate`, 'post', params, {
  showLoading: true
});

//常量
export const apiConstant = (params) => ajax.request(`/v1/constant`, 'get', '', {
  showLoading: true
});


//核销按钮
export const apiRevenueEntry = (params) => ajax.request(`/v1/business/receivable/manage/revenueEntry`, 'post', params, {
  showLoading: true
});

//导入收入
export const apiGatherImport = (params) => ajax.uploadParam(`/v1//business/receivable/manage/import`, params, {
  showLoading: true
});

//导入收入
export const apiGatherList = (params) => ajax.uploadParam(`/v1//business/receivable/manage/list`, params, {
  showLoading: true
});
